﻿using Super_Management_Mayhem.Content.Spritesheet;
using Transformable_Engine_v2.Engine.Animation.ColorAnimation;
using Transformable_Engine_v2.Engine.Animation.PositionAnimation;
using Transformable_Engine_v2.Engine.Animation.RotationAnimation;
using Transformable_Engine_v2.Engine.Animation.ScaleAnimation;
using Transformable_Engine_v2.Engine.Animation.Trajectory;
using Transformable_Engine_v2.Engine.GameObjects.Containers;
using Transformable_Engine_v2.Engine.Graphics;
using Transformable_Engine_v2.Engine.Helper;
using Transformable_Engine_v2.Engine.Transformable_Math.Geometry;

namespace Super_Management_Mayhem.Screens.Playing.Particle.Explosion
{
    public class BombInsideSmoke : ImageContainer
    {
        public BombInsideSmoke(TE_Vector2 position)
        {
            PositionGridBound = position * Randomizer.Double(0.9, 1);
            Sprite = ParticleSheet.GetSprite(ParticleSheet.Explosion.SmokeInside);
            Color = new Color(Color.White, 200);
            Origin = TE_Rectangle.Alignment.CenterMiddle;
            Scale = new TE_Vector2(2, 2);

            AddAnimations(new PositionUniformLinearAnimation(0, position.ToUnit() * Randomizer.Double(0, 2)));
            AddAnimations(new RotationUniformLinearAnimation(0, Randomizer.Double(-1, 1)));
            AddAnimations(new ScaleUniformLinearAnimation(700, new TE_Vector2(-1, -1)));
            AddAnimations(new ColorAnimation(new LinearEasing(), Color.Transparent, 800, false, 400));
            Die(1200);
        }
    }
}
